#include "./socket_lib/ClientSocket.h"
#include "./socket_lib/SocketException.h"
#include <iostream>
#include <string>
#include "CommFormat.h"

int main ( void )
{
	try
	{
		ClientSocket client_socket ( "2001:da8:bf:0:392e:443b:aa97:60b5", 30000);

		std::string reply;

		try
		{
			client_socket << "d";
			client_socket >> reply;
		}
		catch ( SocketException& ) {}

		std::cout << "We received this response from the server:\n\"" << reply << "\"\n";

	}
	catch ( SocketException& e )
	{
		std::cout << "Exception was caught:" << e.description() << "\n";
	}

	return 0;
}

